const { compose, curry } = require('folktale/core/lambda');
const { first, toUpper } = require('lodash/fp');
/**
 * 方式1，柯里化
 */
let f1 = curry(2, (x, y) => {
  return x + y
})

console.log(f1(1, 2))
console.log(f1(1)(2))

/**
 * 方式2，folktale函数时编程库的组合函数使用
 */
let f2 = compose(toUpper, first)
console.log(f2(['one', 'two']))
